package java8.optional;

import java.util.Optional;

/**
 * @program: util
 * @description:
 * @author: zhouliangliang
 * @create: 2019-09-12 10:37
 **/
public class Person {



    private Optional<Car> car;
    private Integer age;

    public Optional<Car> getCar() {
        return car;
    }

    public void setCar(Optional<Car> car) {
        this.car = car;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Optional<Integer> getAge() {
        return Optional.ofNullable(age);
    }
}
